<?php

namespace app\admin\model;

use think\Model;

class PohtoReport extends Model
{
    protected $name = 'car_photo_report'; //表名
    // 定义时间戳字段名
    protected $dateFormat = 'Y/m/d H:i:s';
    protected $createTime = 'create_at';
    protected $updateTime = 'update_at';
    public function photo()
    {
        return $this->hasOne(PohtoList::class, 'id', 'photo_id')->bind([
            'photo_name' => 'name',
        ]);
    }
    public function user()
    {
        return $this->hasOne(UserModel::class, 'id', 'user_id')->bind([
            'nickname' => 'nickname',
        ]);
    }
}